package com.boat.ai.dto.req;

import com.boat.ai.dto.rsp.KwSegmentRsp;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper(componentModel = "cdi")
public class TextAddReq {

    @NotNull(message = "知识库id不能为空")
    @Schema(description = "知识库id", required = true)
    public Long knowledgeId;

    @NotBlank(message = "文档状态不能为空")
    @Schema(description = "文档状态", required = true)
    public String status;

    @NotBlank(message = "文档标题不能为空")
    @Schema(description = "文档标题", required = true)
    public String title;

    @NotEmpty(message = "文档内容至少有一个片段")
    @Schema(description = "文档内容")
    @NotNull(message = "文档内容不能为空")
    @Valid
    public List<KwSegmentReq> content;
}
